<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			table,
			tr,
			td {
				border: 1px solid black;
				border-collapse: collapse;
			}
			
			td {
				width: 200px;
				height: 30px;
			}
			
			tr.se {
				background: pink;
			}
		</style>
		<script src="js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript">
			$(function(){
				//选择下标值为双数的元素，包含0
				$("table tr:even").css("background" , "pink");
				//选择下标值为单数的元素
				$("table tr:odd").css("background" , "yellow");
			});
		</script>
	</head>

	<body>
		<table>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>

		</table>
	</body>

</html>